/*
 *    Copyright (c) 2018-2025, nart All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *
 * Redistributions of source code must retain the above copyright notice,
 * this list of conditions and the following disclaimer.
 * Redistributions in binary form must reproduce the above copyright
 * notice, this list of conditions and the following disclaimer in the
 * documentation and/or other materials provided with the distribution.
 * Neither the name of the pig4cloud.com developer nor the names of its
 * contributors may be used to endorse or promote products derived from
 * this software without specific prior written permission.
 * Author: nart
 */

package com.nai365.nart.operation.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.nai365.nart.operation.entity.CompoundDemand;
import com.nai365.nart.operation.entity.CompoundResources;

import java.util.List;

/**
 * 合成需求
 *
 * @author baogs
 * @date 2022-07-01 11:13:17
 */
public interface CompoundDemandService extends IService<CompoundDemand> {


	/**
	 * 保存需求，包括合成所需资源
	 *
	 * @param compoundDemand 实体对象
	 * @return Boolean
	 */
	boolean save(CompoundDemand compoundDemand);

	/**
	 * 查询合成需求详情，包含合成资源我可用份数
	 *
	 * @param id 需求Id
	 * @return 合成需求
	 */
	CompoundDemand getAbleCountById(Long id);

	/**
	 * 根据合成需求查询所需资源/材料
	 *
	 * @param demand 合成需求
	 * @return 合成所需资源列表
	 */
	List<CompoundResources> findResourcesByDemand(Long demand);

}
